import { Component, OnInit, ElementRef,Input } from '@angular/core';
import { removeNgTag } from '../shared/utils/host';

@Component({
  selector: 'el-container',
  templateUrl: './container.component.html'
})
export class ContainerComponent implements OnInit {
  private el: any;
  @Input() direction: string = '';
  @Input() class: string = '';
  @Input() isVertical: boolean = false;

  constructor(el: ElementRef) {
    this.el = el;
  };


  ngOnInit(): void {
    this.isVertical = this.direction === 'vertical';
    removeNgTag(this.el.nativeElement);
  }

  setVertical(isVertical?: boolean): void {
    if (isVertical && this.direction !== 'horizontal') {
      this.isVertical = true;
  }
  };
  
}
